package com.mycom.service.impl;


import com.mycom.dao.TeamSubmitFormDao;
import com.mycom.pojo.TeamSubmitForm;
import com.mycom.service.TeamSubmitFormService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class TeamSubmitFormServiceImpl implements TeamSubmitFormService {
    @Autowired
    private TeamSubmitFormDao teamSubmitFormDao;

    @Override
    public boolean save(TeamSubmitForm teamSubmitForm) {
        return teamSubmitFormDao.save(teamSubmitForm) > 0 ? true : false;
    }

    @Override
    public List<TeamSubmitForm> findByIdCardNumber(String idCardNumber) {
        return teamSubmitFormDao.findByIdCardNumber(idCardNumber);
    }

    public TeamSubmitForm findById(Integer formId){
        return teamSubmitFormDao.findById(formId);
    }

    public boolean updateTeamState(Integer formId,Integer teamState){
        return teamSubmitFormDao.updateTeamState(formId,teamState) > 0 ? true : false;
    }
}
